<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="java.util.*" %>
<%@ page import="com.ionglobal.db.*" %>
<%@ page import="com.ionglobal.lib.*" %>
<%@ page import="com.ionglobal.cms.*" %>
<%@ page import="com.ionglobal.misc.*" %>

<%@ include file="../check_right.jsp" %>
<%@ include file="../init_include.jsp" %>
<%		
	Integer id;
	Integer roleNum;
	String sql="",tmpStr;
	Vector vc=new Vector();
		
		roleNum=new Integer(request.getParameter("roleNum"));
		out.println("roleNum="+roleNum+"<br>");
		
		for (int i=0;i<roleNum.intValue();i++)
		{
			
			if (request.getParameter("checkbox"+i)!=null)
			{		
					tmpStr="";
					id=new Integer(request.getParameter("checkbox"+i));
					for ( int k=0;k<9;k++)
					{	
						if (request.getParameter("checkbox"+String.valueOf(i)+String.valueOf(k))!=null)
						tmpStr+="1";
						else
						tmpStr+="0";
					}
					
					sql="update sys_role set permission='"+tmpStr.trim()+"' where id="+id;
					SysRole.updateRole(dbi,sql);
					out.println(sql+"<br>");
			}
		}	
	response.sendRedirect("sysRoleManager.jsp");			
%>	
<%@ include file="../init_free.jsp" %>

